package org.aperture.eve.gui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.CoolBar;
import org.eclipse.swt.widgets.CoolItem;
import org.eclipse.swt.widgets.ExpandBar;
import org.eclipse.swt.widgets.ExpandItem;
import org.eclipse.wb.swt.SWTResourceManager;
import org.eclipse.swt.custom.ViewForm;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.widgets.ProgressBar;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.custom.CBanner;

public class InitGUI {

	protected Shell shell;
	private Table table;

	/**
	 * Launch the application.
	 * @param args
	 */
//	public static void main(String[] args) {
//		try {
//			InitGUI window = new InitGUI();
//			window.open();
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//	}
	
	/**
	 * @wbp.parser.entryPoint
	 */
	public static void start() {
		try {
			InitGUI window = new InitGUI();
			window.open();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Open the window.
	 */
	public void open() {
		Display display = Display.getDefault();
		createContents();
		shell.open();
		shell.layout();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}

	/**
	 * Create contents of the window.
	 */
	protected void createContents() {
		shell = new Shell();
		shell.setMinimumSize(new Point(500, 400));
		shell.setSize(1200, 900);
		shell.setText("SWT Application");
		
		CTabFolder tabFolder_1 = new CTabFolder(shell, SWT.BORDER);
		tabFolder_1.setMRUVisible(true);
		tabFolder_1.setSimple(false);
		tabFolder_1.setLocation(0, 0);
		tabFolder_1.setSize(280, 641);
		tabFolder_1.setMinimizeVisible(true);
		tabFolder_1.setMaximizeVisible(true);
		tabFolder_1.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
		
		CTabItem tbtmMinerals_1 = new CTabItem(tabFolder_1, SWT.NONE);
		tbtmMinerals_1.setText("Minerals");
		
		table = new Table(tabFolder_1, SWT.BORDER | SWT.FULL_SELECTION);
		table.setHeaderVisible(true);
		tbtmMinerals_1.setControl(table);
		table.setLinesVisible(true);
		
		CTabItem tbtmTechComponents = new CTabItem(tabFolder_1, SWT.NONE);
		tbtmTechComponents.setText("Tech 2 Components");
		
		CTabItem tbtmMoonMats = new CTabItem(tabFolder_1, SWT.NONE);
		tbtmMoonMats.setText("Moon Mats");
		
		CLabel lblEVETime = new CLabel(shell, SWT.NONE);
		lblEVETime.setBottomMargin(0);
		lblEVETime.setBounds(0, 821, 512, 21);
		lblEVETime.setText("EVE Time:");
		
		CLabel lblProgress = new CLabel(shell, SWT.NONE);
		lblProgress.setBounds(738, 821, 61, 21);
		lblProgress.setText("Progress:");
		
		ProgressBar progressBar = new ProgressBar(shell, SWT.NONE);
		progressBar.setBounds(805, 821, 379, 21);
		
		Label label = new Label(shell, SWT.SEPARATOR | SWT.VERTICAL);
		label.setBounds(730, 821, 2, 21);
		
		Combo combo = new Combo(shell, SWT.READ_ONLY);
		combo.setBounds(915, 0, 269, 23);
		
		Menu menu = new Menu(shell, SWT.BAR);
		shell.setMenuBar(menu);
		
		MenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);
		mntmNewSubmenu.setText("New SubMenu");
		
		Menu menu_1 = new Menu(mntmNewSubmenu);
		mntmNewSubmenu.setMenu(menu_1);
		
		MenuItem mntmNewCheckbox = new MenuItem(menu_1, SWT.CHECK);
		mntmNewCheckbox.setText("New CheckBox");
		
		ExpandBar expandBar = new ExpandBar(shell, SWT.NONE);
		expandBar.setBounds(631, 40, 553, 523);
		
		ExpandItem xpndtmNewExpanditem = new ExpandItem(expandBar, SWT.NONE);
		xpndtmNewExpanditem.setText("Gunnery");
		
		Composite composite = new Composite(expandBar, SWT.NONE);
		xpndtmNewExpanditem.setControl(composite);
		xpndtmNewExpanditem.setHeight(xpndtmNewExpanditem.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
		
		CLabel lblNewLabel = new CLabel(composite, SWT.NONE);
		lblNewLabel.setBounds(10, 10, 61, 21);
		lblNewLabel.setText("New Label");
		
		CLabel lblNewLabel_1 = new CLabel(composite, SWT.NONE);
		lblNewLabel_1.setBounds(10, 33, 61, 21);
		lblNewLabel_1.setText("New Label");

	}
}
